Integrand size = 25, antiderivative size = 88 \[ \int \cot ^4(c+d x) \csc (c+d x) (a+b \sin (c+d x)) \, dx=b x-\frac {3 a \text {arctanh}(\cos (c+d x))}{8 d}+\frac {b \cot (c+d x)}{d}-\frac {b \cot ^3(c+d x)}{3 d}+\frac {3 a \cot (c+d x) \csc (c+d x)}{8 d}-\frac {a \cot ^3(c+d x) \csc (c+d x)}{4 d} \]
[Out]
Time = 0.08 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {2917, 2691, 3855, 3554, 8} \[ \int \cot ^4(c+d x) \csc (c+d x) (a+b \sin (c+d x)) \, dx=-\frac {3 a \text {arctanh}(\cos (c+d x))}{8 d}-\frac {a \cot ^3(c+d x) \csc (c+d x)}{4 d}+\frac {3 a \cot (c+d x) \csc (c+d x)}{8 d}-\frac {b \cot ^3(c+d x)}{3 d}+\frac {b \cot (c+d x)}{d}+b x \]
[In]
[Out]
Rule 8
Rule 2691
Rule 2917
Rule 3554
Rule 3855
Rubi steps \begin{align*} \text {integral}& = a \int \cot ^4(c+d x) \csc (c+d x) \, dx+b \int \cot ^4(c+d x) \, dx \\ & = -\frac {b \cot ^3(c+d x)}{3 d}-\frac {a \cot ^3(c+d x) \csc (c+d x)}{4 d}-\frac {1}{4} (3 a) \int \cot ^2(c+d x) \csc (c+d x) \, dx-b \int \cot ^2(c+d x) \, dx \\ & = \frac {b \cot (c+d x)}{d}-\frac {b \cot ^3(c+d x)}{3 d}+\frac {3 a \cot (c+d x) \csc (c+d x)}{8 d}-\frac {a \cot ^3(c+d x) \csc (c+d x)}{4 d}+\frac {1}{8} (3 a) \int \csc (c+d x) \, dx+b \int 1 \, dx \\ & = b x-\frac {3 a \text {arctanh}(\cos (c+d x))}{8 d}+\frac {b \cot (c+d x)}{d}-\frac {b \cot ^3(c+d x)}{3 d}+\frac {3 a \cot (c+d x) \csc (c+d x)}{8 d}-\frac {a \cot ^3(c+d x) \csc (c+d x)}{4 d} \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.04 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.74 \[ \int \cot ^4(c+d x) \csc (c+d x) (a+b \sin (c+d x)) \, dx=\frac {5 a \csc ^2\left (\frac {1}{2} (c+d x)\right )}{32 d}-\frac {a \csc ^4\left (\frac {1}{2} (c+d x)\right )}{64 d}-\frac {b \cot ^3(c+d x) \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},1,-\frac {1}{2},-\tan ^2(c+d x)\right )}{3 d}-\frac {3 a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}+\frac {3 a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}-\frac {5 a \sec ^2\left (\frac {1}{2} (c+d x)\right )}{32 d}+\frac {a \sec ^4\left (\frac {1}{2} (c+d x)\right )}{64 d} \]
[In]
[Out]
Time = 0.30 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.18
method | result | size |
derivativedivides | \(\frac {a \left (-\frac {\cos ^{5}\left (d x +c \right )}{4 \sin \left (d x +c \right )^{4}}+\frac {\cos ^{5}\left (d x +c \right )}{8 \sin \left (d x +c \right )^{2}}+\frac {\left (\cos ^{3}\left (d x +c \right )\right )}{8}+\frac {3 \cos \left (d x +c \right )}{8}+\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )+b \left (-\frac {\left (\cot ^{3}\left (d x +c \right )\right )}{3}+\cot \left (d x +c \right )+d x +c \right )}{d}\) | \(104\) |
default | \(\frac {a \left (-\frac {\cos ^{5}\left (d x +c \right )}{4 \sin \left (d x +c \right )^{4}}+\frac {\cos ^{5}\left (d x +c \right )}{8 \sin \left (d x +c \right )^{2}}+\frac {\left (\cos ^{3}\left (d x +c \right )\right )}{8}+\frac {3 \cos \left (d x +c \right )}{8}+\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )+b \left (-\frac {\left (\cot ^{3}\left (d x +c \right )\right )}{3}+\cot \left (d x +c \right )+d x +c \right )}{d}\) | \(104\) |
parallelrisch | \(\frac {3 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -3 a \left (\cot ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+8 b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-8 b \left (\cot ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-24 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a +24 a \left (\cot ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+192 b x d -120 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+72 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+120 b \cot \left (\frac {d x}{2}+\frac {c}{2}\right )}{192 d}\) | \(133\) |
risch | \(b x -\frac {-48 i b \,{\mathrm e}^{6 i \left (d x +c \right )}+15 a \,{\mathrm e}^{7 i \left (d x +c \right )}+96 i b \,{\mathrm e}^{4 i \left (d x +c \right )}+9 a \,{\mathrm e}^{5 i \left (d x +c \right )}-80 i b \,{\mathrm e}^{2 i \left (d x +c \right )}+9 a \,{\mathrm e}^{3 i \left (d x +c \right )}+32 i b +15 a \,{\mathrm e}^{i \left (d x +c \right )}}{12 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{4}}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{8 d}+\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{8 d}\) | \(151\) |
norman | \(\frac {b x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+b x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {a}{64 d}+\frac {7 a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64 d}-\frac {7 a \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64 d}+\frac {a \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64 d}-\frac {b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{24 d}+\frac {7 b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}-\frac {7 b \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}+\frac {b \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}+\frac {a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+\frac {3 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}\) | \(214\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 180 vs. \(2 (80) = 160\).
Time = 0.30 (sec) , antiderivative size = 180, normalized size of antiderivative = 2.05 \[ \int \cot ^4(c+d x) \csc (c+d x) (a+b \sin (c+d x)) \, dx=\frac {48 \, b d x \cos \left (d x + c\right )^{4} - 96 \, b d x \cos \left (d x + c\right )^{2} - 30 \, a \cos \left (d x + c\right )^{3} + 48 \, b d x + 18 \, a \cos \left (d x + c\right ) - 9 \, {\left (a \cos \left (d x + c\right )^{4} - 2 \, a \cos \left (d x + c\right )^{2} + a\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 9 \, {\left (a \cos \left (d x + c\right )^{4} - 2 \, a \cos \left (d x + c\right )^{2} + a\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 16 \, {\left (4 \, b \cos \left (d x + c\right )^{3} - 3 \, b \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{48 \, {\left (d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{2} + d\right )}} \]
[In]
[Out]
Timed out. \[ \int \cot ^4(c+d x) \csc (c+d x) (a+b \sin (c+d x)) \, dx=\text {Timed out} \]
[In]
[Out]
none
Time = 0.42 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.22 \[ \int \cot ^4(c+d x) \csc (c+d x) (a+b \sin (c+d x)) \, dx=\frac {16 \, {\left (3 \, d x + 3 \, c + \frac {3 \, \tan \left (d x + c\right )^{2} - 1}{\tan \left (d x + c\right )^{3}}\right )} b - 3 \, a {\left (\frac {2 \, {\left (5 \, \cos \left (d x + c\right )^{3} - 3 \, \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1} + 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) - 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{48 \, d} \]
[In]
[Out]
none
Time = 0.35 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.74 \[ \int \cot ^4(c+d x) \csc (c+d x) (a+b \sin (c+d x)) \, dx=\frac {3 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 8 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 24 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 192 \, {\left (d x + c\right )} b + 72 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 120 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {150 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 120 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 24 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 8 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4}}}{192 \, d} \]
[In]
[Out]
Time = 11.85 (sec) , antiderivative size = 221, normalized size of antiderivative = 2.51 \[ \int \cot ^4(c+d x) \csc (c+d x) (a+b \sin (c+d x)) \, dx=\frac {3\,a\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{8\,d}+\frac {5\,b\,\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,d}-\frac {5\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,d}+\frac {2\,b\,\mathrm {atan}\left (\frac {8\,b\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )+3\,a\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{3\,a\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )-8\,b\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {a\,{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}-\frac {a\,{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{64\,d}-\frac {b\,{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24\,d}-\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{64\,d}+\frac {b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24\,d} \]
[In]
[Out]